Cocktail Help Reference
CountInCache Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > IRepository<T> Interface : CountInCache Method



predicate
Optional predicate to filter the entities

Glossary Item Box

Returns the number of entities in the cache.

Syntax

Visual Basic (Declaration) 
Function CountInCache( _
   Optional ByVal predicate As Expression(Of Func(Of T,Boolean)) _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As IRepository(Of T)
Dim predicate As Expression(Of Func(Of T,Boolean))
Dim value As Integer
 
value = instance.CountInCache(predicate)
C# 
int CountInCache( 
   Expression<Func<T,bool>> predicate
)
C++/CLI 
int CountInCache( 
   Expression<Func<T^,bool>^>^ predicate
) 

Parameters

predicate
Optional predicate to filter the entities

Return Value

The number of entities matching the optional expression.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.